package com.qst0916_2.aspect;


import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;


@Aspect
@Component

public class MyAspectMax {


    @Pointcut( "execution(* com.qst0916_2.dao.*.*(..))")
    public void point(){


    }
    @Before( "point()")
    public void before(JoinPoint joinPoint){
        System.out.println("前置通知"+joinPoint.getTarget()+" "+joinPoint.getSignature().getName());
    }

    @AfterReturning("point()")
    public void afterReturning(JoinPoint joinPoint){
        System.out.println("环绕通知"+joinPoint.getTarget()+joinPoint.getSignature().getName());
    }
}
